package com.ketangpai.admin.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ketangpai.admin.entity.StuWork;
import com.ketangpai.admin.entity.dto.StuWorkDTO;
import com.ketangpai.admin.entity.param.StuWorkParam;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface StuWorkDao extends BaseMapper<StuWork> {
    Integer countStatus(Integer work_id, Integer status);

    //根据用户、课程id查询作业
    List<StuWorkDTO> queryByUCid(Integer cid, Integer uid);

    //根据条件分页查询作业
    List<StuWorkDTO> queryAllByLimit(@Param("param") StuWorkParam param);

    Integer getTotal(@Param("param") StuWorkParam param);//根据条件查询总数

    Integer getAllTotal(@Param("param") StuWorkParam param);//根据作业id查询总数
}
